package org.dizem.groupon.dao;

import org.dizem.groupon.model.domain.UserEntity;

import java.util.List;

/**
 * User: dizem@126.com
 * Time: 11-6-21 上午10:25
 */
public interface UserDAO extends DAOSupport<UserEntity> {
	boolean validatePassword(UserEntity user);

	boolean isEmailExisted(String email);

	boolean isUsernameExisted(String username);

	UserEntity getByUsername(String username);

	UserEntity getByEmail(String email);

	List<UserEntity> loadAllAdmins();

	List<UserEntity> loadAllOrdinaryUsers();

	int getUserRegisterToday();
}
